//
// Created by Jack Pei on 15/8/9.
// Copyright (c) 2015 ourslook. All rights reserved.
//

#import <Foundation/Foundation.h>


/**
 * TitleView
 */
@interface TitleView : NSObject
@property (nonatomic, strong) UIButton *rightLeftButton;
@property (nonatomic, strong) UIImageView *rightLeftImageView;
@property (nonatomic, strong) UIButton *rightRightButton;
@property (nonatomic, strong) UIImageView *rightRightImageView;
@end

//导航视图titleview
#define NAVTITLE NAV_TITLE(s,f)
UIView* NAV_TITLE(NSString* s,CGRect f);

//添加导航栏右上方定位地址
void NAV_ADDRINIT(UIViewController *vc, SEL rightObj,NSString *title);

//添加导航栏左上方消息条数
void NAV_MSGINIT(UIViewController *vc, SEL leftObj,NSString *title);

//初始化导航
void NAV_INIT(UIViewController *vc ,NSString *title, NSString *left ,SEL leftObj, NSString *right, SEL rightObj);

//初始化导航(右侧两个按钮)
//(TitleView*) NAV_INIT_RightDouble(UIViewController *vc ,NSString *title, NSString *left ,SEL leftObj, NSString *rightLeft, SEL rightLeftObj,  NSString *rightRight, SEL rightRightObj);

//初始化导航
void NAV_IMGINIT(UIViewController *vc ,NSString *title, NSString *left ,SEL leftObj, NSString *right, SEL rightObj);

//定义导航视图 - 搜索导航
void NAV_SEARCH_INIT(UIViewController *vc ,NSString *placeHolder, NSString *right, SEL rightObj);


@interface UIViewController (common)

//初始化导航(右侧两个按钮)
-(TitleView*) NAV_INIT_RightDouble:(UIViewController *)vc title:(NSString *)title left:(NSString *)left leftObj:(SEL) leftObj rightLeft:(NSString *)rightLeft rightLeftObj:(SEL)rightLeftObj rightRight:(NSString *)rightRight rightRightObj:(SEL)rightRightObj;

/**
* title返回键的事件
*/
-(void)backButtonClick:(UIButton *)sender;

/**
* 右侧按钮被点击
*/
-(void)rightTitleClick:(UIButton *)sender;

@end

